package org.example.demo;

import com.sun.org.apache.xpath.internal.operations.String;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Serializable;

/**
 * @ClassName Demo4
 * @Description
 * @Author zhangsw
 * @Date 2020/11/9 16:10
 * @Version 1.0
 */
public class Demo4 {
    public static void main(String[] args) throws IOException {
//        字节输入流：将磁盘中数据输入到内存中
        FileInputStream fis = new FileInputStream("bbb.txt");
        int read = fis.read();
        System.err.println(read);
        int len = 0;
        while ((len = fis.read()) != -1) {
            System.err.println(len);
        }
    }
}
